package ch.ebnoether.softwaretechnologien.xalan;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;

public class XalanApp {

	public static void main(String[] args) throws FileNotFoundException, TransformerException {

		TransformerFactory transformerfactory = TransformerFactory.newInstance();
		StreamSource xsltSource = new StreamSource("People.xsl");
		Transformer transformer = transformerfactory.newTransformer(xsltSource);

		transformer.transform(new StreamSource("People.xml"), new StreamResult(
				new FileOutputStream("output.txt")));
	}

}
